import { stringify } from 'qs';
import request from '@/utils/request';

export async function fetch(params) {
  return request(`/clover/api/v1/feedbacks?${stringify(params)}`);
}

export async function add({ id }) {
  return request(`/clover/api/v1/feedbacks/${id}`, {
    method: 'POST',
  });
}

export async function remove({ id }) {
  return request(`/clover/api/v1/feedbacks/${id}`, {
    method: 'DELETE',
  });
}

export async function update({ id, remark }) {
  return request(`/clover/api/v1/feedbacks/${id}`, {
    method: 'PUT',
    body: { remark },
  });
}